<template>
	<view class="height-screen">
		<cu-custom bgColor="bg-white" isBack>
			<block slot="content">{{$t('filed.pullDetail')}}</block>
		</cu-custom>
		<view class="margin-ht grid gap" style="margin-top: 20rpx;">
			<view class="bg-white radius-xs flex flex-direction padding-tb-sm padding-lr text-df font-400"
				v-for="(item,index) in dataList" :key="index">
				<text class="text-black text-lg">{{item.jointime | handleDateTime('YYYY-MM-DD')}}
					{{$t('filed.pullSuccess')}}</text>
				<text class="text-gray margin-top-sm">{{$t('filed.registerPhone')}}：{{item.mobile}}</text>
			</view>
			<section class="empty" v-if="!dataList.length">
				<u-empty mode="list"  :text="$t('list.empty')" />
			</section>
		</view>
	</view>
</template>

<script>
	import {
		inviteLog
	} from '@/apis'
	export default {
		data() {
			return {
				dataList: [],
				page: 1
			}
		},
		onShow() {
			this.page = 1
			this.dataList = []
			this.inviteLog()
		},
		onReachBottom() {
			this.page++
			this.inviteLog()
		},
		methods: {
			async inviteLog() {
				const res = await inviteLog({
					page: this.page
				})
				this.dataList = this.dataList.concat(...res.data)
			}
		}
	}
</script>

<style lang="scss" scoped>
</style>